package com.h3c.ptability.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.h3c.ptability.entity.PtFileTemplate;
import org.apache.ibatis.annotations.Select;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

/**
 * Copyright (C), 2020-2020, h3c
 * FileName: PtFileTemplateMapper
 *
 * @Author: l22886
 * @Date: 2022-03-14
 * Description: pt_file_template mapper
 * Version: 1.0
 */
public interface PtFileTemplateMapper extends BaseMapper<PtFileTemplate> {

    /**
     * @title: queryListByFuzzy
     * @description: 模糊列表查询
     * @params: [ PtFileTemplate ]
     * @return: java.util.List
     * @createTime: 2022-03-14
     * @version: 1.0
     * @author: l22886
     */
    public List<PtFileTemplate> queryListByFuzzy(PtFileTemplate PtFileTemplate);

    /**
     * @title: queryListByFuzzy
     * @description: 精确列表查询
     * @params: [ PtFileTemplate ]
     * @return: java.util.List
     * @createTime: 2022-03-14
     * @version: 1.0
     * @author: l22886
     */
    public List<PtFileTemplate> queryList(PtFileTemplate PtFileTemplate);

    /**
     * @title: updatePtFileTemplate
     * @description: 更新
     * @params: [ PtFileTemplate ]
     * @return: java.lang.Integer
     * @createTime: 2022-03-14
     * @version: 1.0
     * @author: l22886
     */
    public Integer updatePtFileTemplate(PtFileTemplate PtFileTemplate);

    /**
     * @title: insertPtFileTemplate
     * @description: 插入
     * @params: [ PtFileTemplate ]
     * @return: java.lang.Integer
     * @createTime: 2022-03-14
     * @version: 1.0
     * @author: l22886
     */
    public Integer insertPtFileTemplate(PtFileTemplate PtFileTemplate);

    /**
     * @title: deletePtFileTemplate
     * @description: 删除
     * @params: [ PtFileTemplate ]
     * @return: java.lang.Integer
     * @createTime: 2022-03-14
     * @version: 1.0
     * @author: l22886
     */
    public Integer deletePtFileTemplate(PtFileTemplate PtFileTemplate);

    @Select(" select * from pt_file_template where template_name = #{templateName} or template_code = #{templateCode} ")
    public List<PtFileTemplate> queryFileTemplateList(String templateName,String templateCode);
}
